var moveZeros1 = function (arr) {
    return arr.filter(item=>item!==0).concat(arr.filter(item=>item===0))
}
var moveZeros2 = function (arr) {
    return [...arr.filter(item=>item!==0), ...arr.filter(item=>item===0)]
}
var moveZeros3 = function (arr) {
    for(let i=arr.length-1;i>=0;i--){
        if(arr[i]===0){
            arr.splice(i,1)
            arr.push(0)
        }
    }
    return arr
}
var moveZeros4 = function (arr) {
    let arrCopy = JSON.parse(JSON.stringify(arr))
    let n = 0;
    arrCopy.forEach((item,index) => {
        if(item===0 && typeof(item) === 'number'){
            arr.splice(index-n,1)
            arr.push(item)
            n++;
        }
    });
    return arr
}
console.log(moveZeros3([9,0,9,1,2,1,1,3,1,9,0,0,9,0,0,0,0,0]))